package com.roc.jpamysql.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author roc
 * @since 2024-03-23
 */
@ApiModel(value="LogInfo对象", description="")
public class LogInfo extends Model<LogInfo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "日志类型")
    private String type;

    @ApiModelProperty(value = "接口返回状态码")
    private String responseCode;

    @ApiModelProperty(value = "请求时间")
    private LocalDateTime operateTime;

    @ApiModelProperty(value = "消耗时间")
    private Long spendTime;

    @ApiModelProperty(value = "url")
    private String url;

    @ApiModelProperty(value = "请求体")
    private String body;

    @ApiModelProperty(value = "ip")
    private String ip;

    @ApiModelProperty(value = "查询参数")
    private String query;

    @ApiModelProperty(value = "异常信息")
    private String exception;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
    public String getResponseCode() {
        return responseCode;
    }

    public void setResponseCode(String responseCode) {
        this.responseCode = responseCode;
    }
    public LocalDateTime getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(LocalDateTime operateTime) {
        this.operateTime = operateTime;
    }
    public Long getSpendTime() {
        return spendTime;
    }

    public void setSpendTime(Long spendTime) {
        this.spendTime = spendTime;
    }
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
    public String getQuery() {
        return query;
    }

    public void setQuery(String query) {
        this.query = query;
    }
    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "LogInfo{" +
            "id=" + id +
            ", type=" + type +
            ", responseCode=" + responseCode +
            ", operateTime=" + operateTime +
            ", spendTime=" + spendTime +
            ", url=" + url +
            ", body=" + body +
            ", ip=" + ip +
            ", query=" + query +
            ", exception=" + exception +
        "}";
    }
}
